<form action="{php echo web_url('halfcard/halftype/editlevel')}" method="post" class="form-horizontal form-validate">
	<div class="modal-dialog" style="z-index: 50;">
		<div class="modal-content">
			<div class="modal-header">
				<button data-dismiss="modal" class="close" type="button">×</button>
				<h4 class="modal-title">会员等级</h4>
			</div>
			<div class="modal-body" style="margin-left: 100px;">
				<div class="form-group">
					<label class="col-sm-2 control-label">等级名称</label>
					<div class="col-md-7">
						<input type="text" placeholder="等级名称" name="name" id="name" class="form-control" value="{$level['name']}"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">等级卡面</label>
		    		<div class="col-xs-12 col-sm-8 col-md-8 ">
		      			{php echo attachment_select('cardimg',$level['cardimg'])}
						<span class="help-block">不上传即用默认卡面</span>
		    		</div>
		  		</div>
				{if $id != 'default'}
				<div class="form-group">
					<label class="col-sm-2 control-label">排序</label>
					<div class="col-md-7">
						<input type="text" placeholder="填入正整数，数字越大，排序靠前" name="sort" id="sort" class="form-control" value="{$level['sort']}"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">等级状态</label>
					<div class="col-sm-9">
						<label class="radio-inline">
							<input type="radio" value="0" name="status" {if $level['status'] == 0 || empty($level['status'])} checked="checked" {/if} > 隐藏
						</label>
						<label class="radio-inline">
							<input type="radio" value="1" name="status" {if $level['status'] == 1 } checked="checked" {/if} > 显示
						</label>
					</div>
				</div>
				{if Customized::init('integral074') > 0 }
				<div class="form-group">
					<label class="col-sm-2 control-label">拥军卡</label>
					<div class="col-sm-9">
						<label class="radio-inline">
							<input type="radio" value="0" name="army" {if $level['army'] == 0 || empty($level['army'])} checked="checked" {/if} > 否
						</label>
						<label class="radio-inline">
							<input type="radio" value="1" name="army" {if $level['army'] == 1 } checked="checked" {/if} > 是
						</label>
					</div>
				</div>
				{/if}
				{/if}
				{if p('hhkapi')}
				<div class="form-group">
					<label class="col-sm-2 control-label">惠花卡对应等级</label>
					<div class="col-sm-9">
						<select name="hhklevel" class="form-control chosen-select">
							<option value="1" {if $level['hhklevel'] == 1}selected="selected"{/if}>普通会员</option>
							<option value="2" {if $level['hhklevel'] == 2}selected="selected"{/if}>特权会员</option>
							<option value="3" {if $level['hhklevel'] == 3}selected="selected"{/if}>团长</option>
						</select>
					</div>
				</div>
				{/if}
			</div>
			<div class="modal-footer">
				<input type="hidden" name="id" id="id" value="{$level['id']}" />
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="submit" class="btn btn-primary">提交更改</button>
			</div>
		</div>
	</div>
</form>
